import VueRouter from 'vue-router'

import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import NewsList from './components/news/NewsList.vue'
import PicList from './components/Pic/PicList.vue'
import NewsInfo from './components/news/NewsInfo.vue'
import PhotoInfo from './components/Pic/PhotoInfo.vue'
import ProductList from './components/product/ProductList.vue'
import GoodsInfo from './components/product/GoodsInfo.vue'



var router = new VueRouter({
    routes:[  
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContainer},
        {path:'/member',component:MemberContainer},
        {path:'/search',component:SearchContainer},
        {path:'/shopcar',component:ShopcarContainer},
        {path:'/home/newslist',component:NewsList},
        {path:'/home/pic',component:PicList},
        {path:'/home/newsinfo/:id',component:NewsInfo,props:true},//启动props来接收路由的参数
        {path:'/home/photoinfo/:id',component:PhotoInfo, props:true},
        {path:'/home/product/',component:ProductList},
        {path:'/home/goodsinfo/:id',component:GoodsInfo,props:true},

    ],
    linkActiveClass:'mui-active' //覆盖默认路由高亮的类
})

export default router


